package org.xx.armory.swing.builders;

import org.xx.armory.objectparser.LineInfo;
import org.xx.armory.objectparser.ParsedObject;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.List;

public class ToolBarModel
        extends ParsedObject {
    private final List<String> children;

    /**
     * 构造工具栏模型。
     *
     * @param lineInfo
     *         源文件中的位置信息。
     */
    protected ToolBarModel(
            LineInfo lineInfo,
            Collection<String> children
    ) {
        super(lineInfo);

        this.children = children != null ? new ArrayList<>(children) : Collections.emptyList();
    }

    public final List<String> getChildren() {
        return this.children;
    }
}
